package com.stk.doublebreak;

import org.andengine.util.color.Color;

public class Util {
	
	public static Color HexToRGB(String s){	
		return new Color(Integer.valueOf( s.substring( 1, 3 ), 16 ) / 255f,
				Integer.valueOf( s.substring( 3, 5 ), 16 ) / 255f,
	            Integer.valueOf( s.substring( 5, 7 ), 16 ) / 255f);
	}
	
	public static float HexToR(String s){	
		return (Integer.valueOf( s.substring( 0, 2 ), 16 ) / 255f);
	}
	
	public static float HexToG(String s){	
		return (Integer.valueOf( s.substring( 0, 2 ), 16 ) / 255f);
	}
	
	public static float HexToB(String s){	
		return (Integer.valueOf( s.substring( 0, 2 ), 16 ) / 255f);
	}
}
